<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE >
<html>

<head>
    <meta charset="utf-8">
    <title>员工添加</title>
    <!--Mazey's jQuery-->
    <script type="text/javascript" src="static/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript"
            src="static/bootstrap-3.4.1/js/bootstrap.js"></script>
    <link href="static/bootstrap-3.4.1/css/bootstrap.css" rel="stylesheet">
    <!--让IE使用最新的渲染模式，支持CSS3-->
    <meta http-equiv="X-UA-Compatible" content="IE-edge,chrome=1">
    <!--如果IE版本低于IE9，使浏览器支持HTML5和CSS3-->

    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>

    <link rel="stylesheet" href="static/css/style.css" />
</head>

<body>
<!-- 员工添加的模态框 -->
<div class="modal-fade" id="myModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">员工添加</h4>
            </div>
            <div class="modal-body">
                <!-- 添加一个form -->
                <form class="form-horizontal" action="AddEmpServlet" method="post">
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-2 control-label">员工姓名</label>
                        <div class="col-sm-10">
                            <input type="text" name="name" class="form-control"
                                   id="emp_name" placeholder="empName">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">员工部门</label>
                        <div class="col-sm-10">
                            <input type="text" name="depart" class="form-control"
                                   id="emp_deaprt" placeholder="depart">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword4" class="col-sm-2 control-label">员工工资</label>
                        <div class="col-sm-10">
                            <input type="text" name="salary" name="salary"
                                   class="form-control" id="emp_salary" placeholder="salary">
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default"
                                data-dismiss="modal">关闭</button>
                    </div>
                    <%--        </div>--%>
                    <button type="submit" class="btn btn-default">添加</button>
                </form>
            </div>
        </div>
    </div>
</div>


</body>
</html>

<script type="text/javascript">
    $("#emp_add_modal_btn").click(function() {
        $('#myModal').modal({
            backdrop : "static"
        });
    });
</script>
